<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>张晓明的个人主页 - 兴趣社交</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary: #4f46e5;
            --primary-light: #f0f4ff;
            --secondary: #64748b;
            --light: #f8fafc;
            --dark: #1e293b;
            --success: #10b981;
            --danger: #ef4444;
            --warning: #f59e0b;
            --border: #e2e8f0;
            --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
            --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
        }
        
        body {
            font-family: 'Inter', system-ui, sans-serif;
            background-color: #f8fafc;
            color: var(--dark);
            line-height: 1.6;
        }
        
        .navbar {
            box-shadow: var(--shadow);
            background-color: white;
        }
        
        .container {
            padding: 2rem 0;
        }
        
        /* 头部横幅样式 */
        .profile-header {
            position: relative;
            margin-bottom: 2rem;
        }
        
        .cover-photo {
            height: 300px;
            background-color: var(--primary-light);
            border-radius: 1rem;
            overflow: hidden;
            position: relative;
        }
        
        .cover-photo img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .profile-actions {
            position: absolute;
            top: 1rem;
            right: 1rem;
            display: flex;
            gap: 0.75rem;
        }
        
        .avatar-container {
            position: absolute;
            bottom: -60px;
            left: 2rem;
            border: 4px solid white;
            border-radius: 50%;
            width: 130px;
            height: 130px;
            overflow: hidden;
            box-shadow: var(--shadow);
        }
        
        .avatar {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        /* 个人信息区域 */
        .profile-info {
            padding-top: 80px;
            margin-bottom: 2rem;
        }
        
        .profile-main-info {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            margin-bottom: 1rem;
        }
        
        .profile-name {
            font-size: 2rem;
            font-weight: 700;
            margin-bottom: 0.25rem;
        }
        
        .profile-title {
            color: var(--secondary);
            font-size: 1.1rem;
            margin-bottom: 1rem;
        }
        
        .profile-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 1.5rem;
            margin-bottom: 1rem;
        }
        
        .meta-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--secondary);
        }
        
        .meta-item i {
            color: var(--primary);
        }
        
        .profile-bio {
            font-size: 1rem;
            line-height: 1.7;
            max-width: 800px;
            margin-bottom: 1.5rem;
        }
        
        .profile-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            margin-bottom: 1.5rem;
        }
        
        .profile-tag {
            background-color: var(--primary-light);
            color: var(--primary);
            padding: 0.375rem 1rem;
            border-radius: 999px;
            font-size: 0.9rem;
        }
        
        /* 内容导航 */
        .content-tabs {
            background-color: white;
            border-radius: 0.75rem;
            box-shadow: var(--shadow);
            margin-bottom: 2rem;
        }
        
        .nav-tabs {
            border-bottom: 1px solid var(--border);
        }
        
        .nav-tabs .nav-item .nav-link {
            color: var(--secondary);
            border: none;
            padding: 1rem 1.5rem;
            font-weight: 500;
            transition: all 0.2s;
        }
        
        .nav-tabs .nav-item .nav-link.active {
            color: var(--primary);
            border-bottom: 3px solid var(--primary);
        }
        
        .nav-tabs .nav-item .nav-link:hover {
            color: var(--primary);
            background-color: var(--primary-light);
        }
        
        /* 内容区域 */
        .content-container {
            display: grid;
            grid-template-columns: 3fr 1fr;
            gap: 2rem;
        }
        
        @media (max-width: 992px) {
            .content-container {
                grid-template-columns: 1fr;
            }
        }
        
        .main-content {
            background-color: white;
            border-radius: 0.75rem;
            box-shadow: var(--shadow);
            padding: 1.5rem;
        }
        
        .sidebar {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }
        
        .sidebar-card {
            background-color: white;
            border-radius: 0.75rem;
            box-shadow: var(--shadow);
            padding: 1.5rem;
        }
        
        .sidebar-title {
            font-weight: 600;
            font-size: 1.1rem;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .sidebar-title i {
            color: var(--primary);
        }
        
        /* 动态内容 */
        .post-item {
            border-bottom: 1px solid var(--border);
            padding-bottom: 1.5rem;
            margin-bottom: 1.5rem;
        }
        
        .post-item:last-child {
            border-bottom: none;
            padding-bottom: 0;
            margin-bottom: 0;
        }
        
        .post-header {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1rem;
        }
        
        .post-avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .post-author {
            font-weight: 600;
        }
        
        .post-time {
            color: var(--secondary);
            font-size: 0.85rem;
        }
        
        .post-content {
            margin-bottom: 1rem;
            line-height: 1.7;
        }
        
        .post-images {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 0.5rem;
            margin-bottom: 1rem;
            border-radius: 0.5rem;
            overflow: hidden;
        }
        
        .post-image {
            width: 100%;
            height: 150px;
            object-fit: cover;
        }
        
        .post-actions {
            display: flex;
            gap: 1.5rem;
        }
        
        .post-action {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--secondary);
            background: none;
            border: none;
            font-size: 0.9rem;
            cursor: pointer;
            transition: color 0.2s;
        }
        
        .post-action:hover {
            color: var(--primary);
        }
        
        .post-action.liked {
            color: var(--danger);
        }
        
        /* 留言区域 */
        .comments-section {
            margin-top: 2rem;
        }
        
        .comments-title {
            font-weight: 600;
            font-size: 1.3rem;
            margin-bottom: 1.5rem;
        }
        
        .comment-form {
            margin-bottom: 2rem;
        }
        
        .comment-textarea {
            width: 100%;
            border: 1px solid var(--border);
            border-radius: 0.5rem;
            padding: 1rem;
            resize: none;
            min-height: 100px;
            margin-bottom: 1rem;
            transition: border-color 0.2s;
        }
        
        .comment-textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        }
        
        .comment-actions {
            display: flex;
            justify-content: flex-end;
        }
        
        .comment-item {
            border-bottom: 1px solid var(--border);
            padding-bottom: 1.5rem;
            margin-bottom: 1.5rem;
        }
        
        .comment-item:last-child {
            border-bottom: none;
        }
        
        .comment-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.75rem;
        }
        
        .comment-author {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        
        .comment-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .comment-name {
            font-weight: 600;
        }
        
        .comment-time {
            color: var(--secondary);
            font-size: 0.85rem;
        }
        
        .comment-content {
            margin-bottom: 0.75rem;
            line-height: 1.6;
        }
        
        .comment-actions {
            display: flex;
            gap: 1.5rem;
        }
        
        .comment-action {
            display: flex;
            align-items: center;
            gap: 0.25rem;
            color: var(--secondary);
            background: none;
            border: none;
            font-size: 0.85rem;
            cursor: pointer;
            transition: color 0.2s;
        }
        
        .comment-action:hover {
            color: var(--primary);
        }
        
        .reply-form {
            margin-top: 1rem;
            margin-bottom: 1rem;
            padding-left: 2rem;
        }
        
        .replies {
            padding-left: 2rem;
            margin-top: 1rem;
        }
        
        .reply-item {
            border-left: 2px solid var(--border);
            padding-left: 1rem;
            margin-bottom: 1rem;
        }
        
        /* 共同好友 */
        .friends-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
            gap: 1rem;
        }
        
        .friend-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }
        
        .friend-avatar {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            object-fit: cover;
            margin-bottom: 0.5rem;
        }
        
        .friend-name {
            font-size: 0.85rem;
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 100%;
        }
        
        /* 兴趣爱好 */
        .interests-list {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
        }
        
        .interest-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            background-color: var(--light);
            padding: 0.5rem 1rem;
            border-radius: 0.5rem;
            font-size: 0.9rem;
        }
        
        .interest-item i {
            color: var(--primary);
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .cover-photo {
                height: 200px;
            }
            
            .avatar-container {
                width: 100px;
                height: 100px;
                bottom: -50px;
            }
            
            .profile-info {
                padding-top: 60px;
            }
            
            .profile-name {
                font-size: 1.5rem;
            }
            
            .profile-main-info {
                flex-direction: column;
                align-items: flex-start;
                gap: 1rem;
            }
            
            .profile-actions {
                position: static;
                width: 100%;
                justify-content: flex-start;
            }
            
            .nav-tabs .nav-item .nav-link {
                padding: 0.75rem 1rem;
                font-size: 0.9rem;
            }
        }
        
        @media (max-width: 576px) {
            .cover-photo {
                height: 150px;
            }
            
            .avatar-container {
                width: 80px;
                height: 80px;
                bottom: -40px;
                left: 1rem;
            }
            
            .profile-info {
                padding-top: 50px;
            }
            
            .profile-meta {
                gap: 1rem;
            }
            
            .post-images {
                grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
            }
            
            .post-image {
                height: 100px;
            }
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg navbar-light">
        <div class="container">
            <a class="navbar-brand" href="#">
                <i class="fas fa-users text-primary me-2"></i>兴趣社交
            </a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav me-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="#">首页</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">兴趣测试</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link active" href="#">人际关系</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">社区</a>
                    </li>
                </ul>
                <div class="d-flex align-items-center gap-3">
                    <button class="btn btn-outline-primary">登录</button>
                    <button class="btn btn-primary">注册</button>
                </div>
            </div>
        </div>
    </nav>
    
    <!-- 主要内容区 -->
    <div class="container">
        <!-- 头部横幅 -->
        <div class="profile-header">
            <div class="cover-photo">
                <img src="https://picsum.photos/1200/400?random=1" alt="张晓明的封面照片" class="cover-image">
                <div class="profile-actions">
                    <button class="btn btn-outline-primary">
                        <i class="far fa-share-square me-1"></i>分享
                    </button>
                    <button class="btn btn-primary">
                        <i class="fas fa-user-plus me-1"></i>加为好友
                    </button>
                </div>
            </div>
            <div class="avatar-container">
                <img src="https://picsum.photos/200/200?random=101" alt="张晓明的头像" class="avatar">
            </div>
        </div>
        
        <!-- 个人信息 -->
        <div class="profile-info">
            <div class="profile-main-info">
                <div>
                    <h1 class="profile-name">张晓明</h1>
                    <div class="profile-title">自由摄影师 | 旅行爱好者</div>
                    
                    <div class="profile-meta">
                        <div class="meta-item">
                            <i class="fas fa-map-marker-alt"></i>
                            <span>北京市 朝阳区</span>
                        </div>
                        <div class="meta-item">
                            <i class="fas fa-calendar"></i>
                            <span>加入于 2021年3月</span>
                        </div>
                        <div class="meta-item">
                            <i class="fas fa-user-friends"></i>
                            <span>328 位好友</span>
                        </div>
                        <div class="meta-item">
                            <i class="fas fa-eye"></i>
                            <span>12.5k 次访问</span>
                        </div>
                    </div>
                    
                    <p class="profile-bio">
                        我是一名自由摄影师，专注于风光和人文摄影。过去5年里，我走过了20多个国家，用镜头记录下世界各地的美好瞬间。
                        喜欢结交同样热爱摄影和旅行的朋友，一起探索未知的风景，分享摄影技巧和旅行故事。
                    </p>
                    
                    <div class="profile-tags">
                        <span class="profile-tag">风光摄影</span>
                        <span class="profile-tag">人文摄影</span>
                        <span class="profile-tag">旅行</span>
                        <span class="profile-tag">户外</span>
                        <span class="profile-tag">城市探索</span>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 内容导航 -->
        <div class="content-tabs">
            <ul class="nav nav-tabs" id="profileTabs" role="tablist">
                <li class="nav-item" role="presentation">
                    <button class="nav-link active" id="posts-tab" data-bs-toggle="tab" data-bs-target="#posts" type="button" role="tab" aria-controls="posts" aria-selected="true">
                        <i class="fas fa-stream me-1"></i>动态
                    </button>
                </li>
                <li class="nav-item" role="presentation">
                    <button class="nav-link" id="photos-tab" data-bs-toggle="tab" data-bs-target="#photos" type="button" role="tab" aria-controls="photos" aria-selected="false">
                        <i class="fas fa-images me-1"></i>照片
                    </button>
                </li>
                <li class="nav-item" role="presentation">
                    <button class="nav-link" id="friends-tab" data-bs-toggle="tab" data-bs-target="#friends" type="button" role="tab" aria-controls="friends" aria-selected="false">
                        <i class="fas fa-users me-1"></i>好友
                    </button>
                </li>
                <li class="nav-item" role="presentation">
                    <button class="nav-link" id="events-tab" data-bs-toggle="tab" data-bs-target="#events" type="button" role="tab" aria-controls="events" aria-selected="false">
                        <i class="fas fa-calendar-alt me-1"></i>活动
                    </button>
                </li>
            </ul>
        </div>
        
        <!-- 内容区域 -->
        <div class="content-container">
            <!-- 主要内容 -->
            <div class="main-content tab-content" id="profileTabsContent">
                <!-- 动态标签页 -->
                <div class="tab-pane fade show active" id="posts" role="tabpanel" aria-labelledby="posts-tab">
                    <!-- 最新动态 -->
                    <div class="post-item">
                        <div class="post-header">
                            <img src="https://picsum.photos/200/200?random=101" alt="张晓明的头像" class="post-avatar">
                            <div>
                                <div class="post-author">张晓明</div>
                                <div class="post-time">3天前</div>
                            </div>
                        </div>
                        <div class="post-content">
                            周末去了郊外的红叶谷，终于拍到了满意的秋日风光。秋天真是摄影的最佳季节，色彩丰富得让人目不暇接。分享几张今天的成果，喜欢的朋友可以一起交流拍摄技巧。
                        </div>
                        <div class="post-images">
                            <img src="https://picsum.photos/400/300?random=11" alt="秋日风光照片1" class="post-image">
                            <img src="https://picsum.photos/400/300?random=12" alt="秋日风光照片2" class="post-image">
                            <img src="https://picsum.photos/400/300?random=13" alt="秋日风光照片3" class="post-image">
                        </div>
                        <div class="post-actions">
                            <button class="post-action like-btn">
                                <i class="far fa-heart"></i>
                                <span>128</span>
                            </button>
                            <button class="post-action comment-btn">
                                <i class="far fa-comment"></i>
                                <span>32</span>
                            </button>
                            <button class="post-action share-btn">
                                <i class="far fa-share-square"></i>
                                <span>分享</span>
                            </button>
                        </div>
                    </div>
                    
                    <!-- 稍早动态 -->
                    <div class="post-item">
                        <div class="post-header">
                            <img src="https://picsum.photos/200/200?random=101" alt="张晓明的头像" class="post-avatar">
                            <div>
                                <div class="post-author">张晓明</div>
                                <div class="post-time">1周前</div>
                            </div>
                        </div>
                        <div class="post-content">
                            参加了城市摄影展，看到了很多优秀的作品，收获满满。遇到了几位摄影界的前辈，交流了很多关于构图和光线运用的心得。附上几张展会现场的照片，感兴趣的朋友可以去看看，还有最后两天。
                        </div>
                        <div class="post-images">
                            <img src="https://picsum.photos/400/300?random=21" alt="摄影展照片1" class="post-image">
                            <img src="https://picsum.photos/400/300?random=22" alt="摄影展照片2" class="post-image">
                        </div>
                        <div class="post-actions">
                            <button class="post-action like-btn liked">
                                <i class="fas fa-heart"></i>
                                <span>86</span>
                            </button>
                            <button class="post-action comment-btn">
                                <i class="far fa-comment"></i>
                                <span>18</span>
                            </button>
                            <button class="post-action share-btn">
                                <i class="far fa-share-square"></i>
                                <span>分享</span>
                            </button>
                        </div>
                    </div>
                    
                    <!-- 留言区域 -->
                    <div class="comments-section">
                        <h3 class="comments-title">留言板</h3>
                        
                        <!-- 留言表单 -->
                        <div class="comment-form">
                            <textarea class="comment-textarea" placeholder="写下你的留言..."></textarea>
                            <div class="comment-actions">
                                <button class="btn btn-primary">发送留言</button>
                            </div>
                        </div>
                        
                        <!-- 留言列表 -->
                        <div class="comments-list">
                            <!-- 留言1 -->
                            <div class="comment-item">
                                <div class="comment-header">
                                    <div class="comment-author">
                                        <img src="https://picsum.photos/200/200?random=102" alt="李婷的头像" class="comment-avatar">
                                        <div>
                                            <div class="comment-name">李婷</div>
                                            <div class="comment-time">2天前</div>
                                        </div>
                                    </div>
                                </div>
                                <div class="comment-content">
                                    晓明，你上周拍的那组城市夜景太赞了！特别是光轨的处理，能请教一下用的什么参数吗？我最近也在尝试夜景摄影，但总是拍不好。
                                </div>
                                <div class="comment-actions">
                                    <button class="comment-action like-btn">
                                        <i class="far fa-heart"></i>
                                        <span>12</span>
                                    </button>
                                    <button class="comment-action reply-btn">
                                        <i class="far fa-reply"></i>
                                        <span>回复</span>
                                    </button>
                                </div>
                                
                                <!-- 回复表单 -->
                                <div class="reply-form" style="display: none;">
                                    <textarea class="comment-textarea" placeholder="回复 @李婷..."></textarea>
                                    <div class="comment-actions">
                                        <button class="btn btn-sm btn-outline-secondary cancel-reply">取消</button>
                                        <button class="btn btn-sm btn-primary send-reply">发送回复</button>
                                    </div>
                                </div>
                                
                                <!-- 回复列表 -->
                                <div class="replies">
                                    <div class="reply-item">
                                        <div class="comment-header">
                                            <div class="comment-author">
                                                <img src="https://picsum.photos/200/200?random=101" alt="张晓明的头像" class="comment-avatar">
                                                <div>
                                                    <div class="comment-name">张晓明</div>
                                                    <div class="comment-time">1天前</div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="comment-content">
                                            @李婷 谢谢喜欢！我用的快门优先模式，快门速度30秒，光圈f/8，ISO100，记得用三脚架和遥控快门哦。
                                        </div>
                                        <div class="comment-actions">
                                            <button class="comment-action like-btn">
                                                <i class="far fa-heart"></i>
                                                <span>5</span>
                                            </button>
                                            <button class="comment-action reply-btn">
                                                <i class="far fa-reply"></i>
                                                <span>回复</span>
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            <!-- 留言2 -->
                            <div class="comment-item">
                                <div class="comment-header">
                                    <div class="comment-author">
                                        <img src="https://picsum.photos/200/200?random=103" alt="王建国的头像" class="comment-avatar">
                                        <div>
                                            <div class="comment-name">王建国</div>
                                            <div class="comment-time">1周前</div>
                                        </div>
                                    </div>
                                </div>
                                <div class="comment-content">
                                    下个月打算去云南采风，有没有推荐的地点？主要想拍一些自然风光和少数民族的人文照片。
                                </div>
                                <div class="comment-actions">
                                    <button class="comment-action like-btn liked">
                                        <i class="fas fa-heart"></i>
                                        <span>8</span>
                                    </button>
                                    <button class="comment-action reply-btn">
                                        <i class="far fa-reply"></i>
                                        <span>回复</span>
                                    </button>
                                </div>
                                
                                <!-- 回复表单 -->
                                <div class="reply-form" style="display: none;">
                                    <textarea class="comment-textarea" placeholder="回复 @王建国..."></textarea>
                                    <div class="comment-actions">
                                        <button class="btn btn-sm btn-outline-secondary cancel-reply">取消</button>
                                        <button class="btn btn-sm btn-primary send-reply">发送回复</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 其他标签页内容（照片、好友、活动） -->
                <div class="tab-pane fade" id="photos" role="tabpanel" aria-labelledby="photos-tab">
                    <div class="text-center py-5">
                        <i class="fas fa-images text-primary fs-1 mb-3"></i>
                        <h3>照片集</h3>
                        <p class="text-secondary">这里将展示张晓明的所有照片</p>
                    </div>
                </div>
                
                <div class="tab-pane fade" id="friends" role="tabpanel" aria-labelledby="friends-tab">
                    <div class="text-center py-5">
                        <i class="fas fa-users text-primary fs-1 mb-3"></i>
                        <h3>好友列表</h3>
                        <p class="text-secondary">这里将展示张晓明的所有好友</p>
                    </div>
                </div>
                
                <div class="tab-pane fade" id="events" role="tabpanel" aria-labelledby="events-tab">
                    <div class="text-center py-5">
                        <i class="fas fa-calendar-alt text-primary fs-1 mb-3"></i>
                        <h3>活动记录</h3>
                        <p class="text-secondary">这里将展示张晓明参与的所有活动</p>
                    </div>
                </div>
            </div>
            
            <!-- 侧边栏 -->
            <div class="sidebar">
                <!-- 共同好友 -->
                <div class="sidebar-card">
                    <h3 class="sidebar-title">
                        <i class="fas fa-user-friends"></i>共同好友
                    </h3>
                    <div class="friends-list">
                        <div class="friend-item">
                            <img src="https://picsum.photos/200/200?random=102" alt="李婷的头像" class="friend-avatar">
                            <span class="friend-name">李婷</span>
                        </div>
                        <div class="friend-item">
                            <img src="https://picsum.photos/200/200?random=103" alt="王建国的头像" class="friend-avatar">
                            <span class="friend-name">王建国</span>
                        </div>
                        <div class="friend-item">
                            <img src="https://picsum.photos/200/200?random=104" alt="刘芳的头像" class="friend-avatar">
                            <span class="friend-name">刘芳</span>
                        </div>
                        <div class="friend-item">
                            <img src="https://picsum.photos/200/200?random=105" alt="陈明的头像" class="friend-avatar">
                            <span class="friend-name">陈明</span>
                        </div>
                    </div>
                    <div class="text-center mt-2">
                        <a href="#" class="text-primary text-sm">查看全部5位共同好友</a>
                    </div>
                </div>
                
                <!-- 兴趣爱好 -->
                <div class="sidebar-card">
                    <h3 class="sidebar-title">
                        <i class="fas fa-tag"></i>兴趣爱好
                    </h3>
                    <div class="interests-list">
                        <div class="interest-item">
                            <i class="fas fa-camera"></i>
                            <span>摄影</span>
                        </div>
                        <div class="interest-item">
                            <i class="fas fa-plane"></i>
                            <span>旅行</span>
                        </div>
                        <div class="interest-item">
                            <i class="fas fa-hiking"></i>
                            <span>徒步</span>
                        </div>
                        <div class="interest-item">
                            <i class="fas fa-mountain"></i>
                            <span>登山</span>
                        </div>
                        <div class="interest-item">
                            <i class="fas fa-book"></i>
                            <span>阅读</span>
                        </div>
                        <div class="interest-item">
                            <i class="fas fa-music"></i>
                            <span>音乐</span>
                        </div>
                    </div>
                </div>
                
                <!-- 最近活动 -->
                <div class="sidebar-card">
                    <h3 class="sidebar-title">
                        <i class="fas fa-calendar-check"></i>最近活动
                    </h3>
                    <div class="events-list">
                        <div class="event-item mb-3 pb-3 border-bottom">
                            <div class="event-title font-weight-semibold mb-1">城市风光摄影展</div>
                            <div class="event-date text-sm text-secondary mb-1">
                                <i class="far fa-calendar-alt me-1"></i>2023-10-15 至 2023-10-30
                            </div>
                            <div class="event-location text-sm text-secondary">
                                <i class="fas fa-map-marker-alt me-1"></i>当代艺术中心
                            </div>
                        </div>
                        <div class="event-item">
                            <div class="event-title font-weight-semibold mb-1">秋季户外摄影采风</div>
                            <div class="event-date text-sm text-secondary mb-1">
                                <i class="far fa-calendar-alt me-1"></i>2023-11-12
                            </div>
                            <div class="event-location text-sm text-secondary">
                                <i class="fas fa-map-marker-alt me-1"></i>红叶谷风景区
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 联系方式 -->
                <div class="sidebar-card">
                    <h3 class="sidebar-title">
                        <i class="fas fa-contact-card"></i>联系方式
                    </h3>
                    <div class="contact-list">
                        <div class="contact-item d-flex align-items-center gap-2 mb-2">
                            <i class="fas fa-envelope text-primary"></i>
                            <span>zhangxm@example.com</span>
                        </div>
                        <div class="contact-item d-flex align-items-center gap-2 mb-2">
                            <i class="fas fa-globe text-primary"></i>
                            <a href="#" class="text-primary">www.zhangxm.photo</a>
                        </div>
                        <div class="contact-item d-flex align-items-center gap-2">
                            <i class="fab fa-weibo text-primary"></i>
                            <a href="#" class="text-primary">@摄影师张晓明</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // 点赞功能
            const likeButtons = document.querySelectorAll('.like-btn');
            likeButtons.forEach(button => {
                button.addEventListener('click', function() {
                    const icon = this.querySelector('i');
                    const countElement = this.querySelector('span');
                    
                    if (countElement) {
                        let count = parseInt(countElement.textContent);
                        
                        if (this.classList.contains('liked')) {
                            // 取消点赞
                            this.classList.remove('liked');
                            icon.classList.remove('fas');
                            icon.classList.add('far');
                            countElement.textContent = count - 1;
                        } else {
                            // 点赞
                            this.classList.add('liked');
                            icon.classList.remove('far');
                            icon.classList.add('fas');
                            countElement.textContent = count + 1;
                        }
                    } else {
                        // 没有计数的点赞按钮（如回复中的点赞）
                        if (this.classList.contains('liked')) {
                            this.classList.remove('liked');
                            icon.classList.remove('fas');
                            icon.classList.add('far');
                        } else {
                            this.classList.add('liked');
                            icon.classList.remove('far');
                            icon.classList.add('fas');
                        }
                    }
                });
            });
            
            // 回复功能
            const replyButtons = document.querySelectorAll('.reply-btn');
            const cancelReplyButtons = document.querySelectorAll('.cancel-reply');
            
            replyButtons.forEach(button => {
                button.addEventListener('click', function() {
                    // 隐藏所有回复表单
                    document.querySelectorAll('.reply-form').forEach(form => {
                        form.style.display = 'none';
                    });
                    
                    // 显示当前评论的回复表单
                    const commentItem = this.closest('.comment-item, .reply-item');
                    const replyForm = commentItem.querySelector('.reply-form');
                    if (replyForm) {
                        replyForm.style.display = 'block';
                        replyForm.querySelector('textarea').focus();
                    }
                });
            });
            
            cancelReplyButtons.forEach(button => {
                button.addEventListener('click', function() {
                    const replyForm = this.closest('.reply-form');
                    replyForm.style.display = 'none';
                });
            });
            
            // 发送回复功能
            const sendReplyButtons = document.querySelectorAll('.send-reply');
            sendReplyButtons.forEach(button => {
                button.addEventListener('click', function() {
                    const replyForm = this.closest('.reply-form');
                    const textarea = replyForm.querySelector('textarea');
                    const replyText = textarea.value.trim();
                    
                    if (replyText) {
                        // 获取回复对象名称
                        const replyTo = textarea.getAttribute('placeholder').match(/@(\S+)/)[1];
                        
                        // 创建新回复元素
                        const repliesContainer = replyForm.nextElementSibling || replyForm.parentElement.querySelector('.replies');
                        
                        // 如果没有回复容器，则创建一个
                        if (!repliesContainer || !repliesContainer.classList.contains('replies')) {
                            const newRepliesContainer = document.createElement('div');
                            newRepliesContainer.className = 'replies';
                            replyForm.parentNode.insertBefore(newRepliesContainer, replyForm.nextSibling);
                            repliesContainer = newRepliesContainer;
                        }
                        
                        // 创建回复项
                        const replyItem = document.createElement('div');
                        replyItem.className = 'reply-item';
                        replyItem.innerHTML = `
                            <div class="comment-header">
                                <div class="comment-author">
                                    <img src="https://picsum.photos/200/200?random=user" alt="你的头像" class="comment-avatar">
                                    <div>
                                        <div class="comment-name">我</div>
                                        <div class="comment-time">刚刚</div>
                                    </div>
                                </div>
                            </div>
                            <div class="comment-content">
                                @${replyTo} ${replyText}
                            </div>
                            <div class="comment-actions">
                                <button class="comment-action like-btn">
                                    <i class="far fa-heart"></i>
                                    <span>0</span>
                                </button>
                                <button class="comment-action reply-btn">
                                    <i class="far fa-reply"></i>
                                    <span>回复</span>
                                </button>
                            </div>
                            <div class="reply-form" style="display: none;">
                                <textarea class="comment-textarea" placeholder="回复 @我..."></textarea>
                                <div class="comment-actions">
                                    <button class="btn btn-sm btn-outline-secondary cancel-reply">取消</button>
                                    <button class="btn btn-sm btn-primary send-reply">发送回复</button>
                                </div>
                            </div>
                        `;
                        
                        // 添加到回复容器
                        repliesContainer.prepend(replyItem);
                        
                        // 清空文本框并隐藏回复表单
                        textarea.value = '';
                        replyForm.style.display = 'none';
                        
                        // 为新添加的回复绑定事件
                        bindReplyEvents(replyItem);
                        
                        // 显示通知
                        showNotification('回复成功');
                    }
                });
            });
            
            // 发送留言功能
            const sendCommentButton = document.querySelector('.comment-form .btn-primary');
            sendCommentButton.addEventListener('click', function() {
                const textarea = document.querySelector('.comment-form .comment-textarea');
                const commentText = textarea.value.trim();
                
                if (commentText) {
                    const commentsList = document.querySelector('.comments-list');
                    
                    // 创建新留言
                    const commentItem = document.createElement('div');
                    commentItem.className = 'comment-item';
                    commentItem.innerHTML = `
                        <div class="comment-header">
                            <div class="comment-author">
                                <img src="https://picsum.photos/200/200?random=user" alt="你的头像" class="comment-avatar">
                                <div>
                                    <div class="comment-name">我</div>
                                    <div class="comment-time">刚刚</div>
                                </div>
                            </div>
                        </div>
                        <div class="comment-content">
                            ${commentText}
                        </div>
                        <div class="comment-actions">
                            <button class="comment-action like-btn">
                                <i class="far fa-heart"></i>
                                <span>0</span>
                            </button>
                            <button class="comment-action reply-btn">
                                <i class="far fa-reply"></i>
                                <span>回复</span>
                            </button>
                        </div>
                        <div class="reply-form" style="display: none;">
                            <textarea class="comment-textarea" placeholder="回复 @我..."></textarea>
                            <div class="comment-actions">
                                <button class="btn btn-sm btn-outline-secondary cancel-reply">取消</button>
                                <button class="btn btn-sm btn-primary send-reply">发送回复</button>
                            </div>
                        </div>
                    `;
                    
                    // 添加到留言列表顶部
                    commentsList.prepend(commentItem);
                    
                    // 清空文本框
                    textarea.value = '';
                    
                    // 为新添加的留言绑定事件
                    bindReplyEvents(commentItem);
                    
                    // 显示通知
                    showNotification('留言成功');
                }
            });
            
            // 绑定回复相关事件
            function bindReplyEvents(element) {
                const replyBtn = element.querySelector('.reply-btn');
                const cancelBtn = element.querySelector('.cancel-reply');
                const sendBtn = element.querySelector('.send-reply');
                const likeBtn = element.querySelector('.like-btn');
                
                if (replyBtn) {
                    replyBtn.addEventListener('click', function() {
                        document.querySelectorAll('.reply-form').forEach(form => {
                            form.style.display = 'none';
                        });
                        element.querySelector('.reply-form').style.display = 'block';
                        element.querySelector('.reply-form textarea').focus();
                    });
                }
                
                if (cancelBtn) {
                    cancelBtn.addEventListener('click', function() {
                        element.querySelector('.reply-form').style.display = 'none';
                    });
                }
                
                if (sendBtn) {
                    sendBtn.addEventListener('click', function() {
                        const textarea = element.querySelector('.reply-form textarea');
                        const replyText = textarea.value.trim();
                        
                        if (replyText) {
                            // 实现发送回复的逻辑，类似于之前的代码
                            textarea.value = '';
                            element.querySelector('.reply-form').style.display = 'none';
                            showNotification('回复成功');
                        }
                    });
                }
                
                if (likeBtn) {
                    likeBtn.addEventListener('click', function() {
                        const icon = this.querySelector('i');
                        const countElement = this.querySelector('span');
                        
                        if (countElement) {
                            let count = parseInt(countElement.textContent);
                            
                            if (this.classList.contains('liked')) {
                                this.classList.remove('liked');
                                icon.classList.remove('fas');
                                icon.classList.add('far');
                                countElement.textContent = count - 1;
                            } else {
                                this.classList.add('liked');
                                icon.classList.remove('far');
                                icon.classList.add('fas');
                                countElement.textContent = count + 1;
                            }
                        }
                    });
                }
            }
            
    </script>
</body>
</html>
    
